package com.wh.springboot.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wh.springboot.common.entity.Vaccine;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author elsy
 * @since 2023-05-03
 */
public interface VaccineMapper extends BaseMapper<Vaccine> {

    Page<Vaccine> findPage(Page<Vaccine> page, @Param("username") String username);

    @Select("SELECT * FROM vaccine WHERE uid = #{userId}")
    List<Vaccine> findByUserId(Integer userId);
}
